

registerCheck = function ()
{
    var username= $("#username").val();
    var nickname= $("#nickname").val();
    var password= $("#password").val();
    var phone= $("#phone").val();
    var mail= $("#mail").val();
    var gender= $("#gender").val();

    var data={
        "username":username,
        "nickname":nickname,
        "password":password,
        "phone":phone,
        "mail":mail,
        "gender":gender
    }

    $.ajax({
        url:"/registerCheck",
        type:"Post",
        data:data,
        success(data){
            alert(data);
            if(data.toString()=="注册成功")
                window.location.href="/login"
        }
    })
}